﻿using Microsoft.AspNetCore.Http;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;

namespace Xfm.Simple.Models
{
    public class UserInfoVm
    {
        [Display(Name = "电子邮箱", Prompt = "电子邮件")]//Prompt=placeholder
        [RequiredCn]
        [EmailAddressCn]
        public string Email { get; set; }

        [Display(Name = "用户名")]
        [RequiredCn]
        [StringLengthCn(20, MinimumLength = 3)]
        public string UserName { get; set; }

        [Display(Name = "密码", Description = "输入密码")]
        [RequiredCn]
        [DataType(DataType.Password)]
        public string Password { get; set; }

        [Display(Name = "验证密码")]
        [DataType(DataType.Password)]
        [CompareCn(nameof(Password))]
        public string CompPassword { get; set; }

        public IFormFile File { get; set; }
    }
}
